This invention relates to a circuit for applying waveform processing to a pulse signal outputted from a pulse generator.
A conventional waveform processing circuit for a pulse generator to output a pulse signal in accordance with movement or traveling of an object to be detected generates a direction discrimination signal and a traveling amount signal for controlling position and traveling speed of a carriage, etc. provided in a motor or a printer. Particularly, in a dot matrix printer, etc., this traveling amount signal is used as a print timing signal.
The configuration of a motor drive system for controlling a rotational speed of a motor provided in a dot matrix printer is shown in FIG. 1. In FIG. 1, a waveform processing circuit PGHS for a pulse generator is provided between a pulse generator PG and a motor control circuit MDRC. Further, FIG. 2 shows signal waveforms of respective components shown in FIG. 1 in the case where the motor DCM continuously rotates in a predetermined direction (in a clockwise direction).
The pulse generator PG outputs an A-phase pulse signal E1 and a B-phase pulse signal E2 having the same period T1 and a phase difference therebetween, in accordance with the rotation of the motor DCM.
The waveform processing circuit PGHS generates a traveling amount signal INT and a direction discrimination signal DIR on the basis of the A-phase pulse signal E1, the B-phase pulse signal E2, and an inverting signal VACK outputted from the motor control circuit MDRC. The traveling amount signal INT is outputted as a signal of Low level for a time period from the time point when the inverting signal VACK is inverted until the A-phase pulse signal E1 is inverted. One pulse of the traveling amount signal INT corresponds to a unit rotational angle of the motor DCM. For a time period during which the INT signal is at High (H) level, a printing signal for a printer, etc, is outputted. It is to be noted that the pulse width where the INT signal is at H level is dependent upon the processing time such as a printing signal output processing, etc. of the motor control circuit MDRC. Further, the direction discrimination signal DIR indicates the rotation direction of the motor DCM, and the time period during which the traveling amount signal INT is at H level is considered to be valid or effective. Namely, assuming that, e.g., the direction discrimination signal DIR is indicative of a counterclockwise direction at H level and indicative of a clock wise direction at Low (L) level, it is indicated that the motor DCM continuously rotates in a rotation direction (in a clockwise direction in this case) indicated by the direction discrimination signal DIR for a time period during which the traveling amount signal INT is at H level.
The motor control circuit MDRC is supplied with a traveling amount signal INT and a direction discrimination signal DIR from the waveform processing circuit PGHS to execute a processing to increase or decrease the rotational speed of the motor DCM every time the traveling amount signal INT rises, and to output an inverting signal VACK which is inverted when that processing is completed in CPU and a next traveling amount signal INT is permitted to be inputted.
However, in the conventional waveform processing circuit PGHS, as seen from the timing chart of FIG. 2, there arises a problem that in the case where a ratio between H level and L level of the A-phase pulse signal E1 (hereinafter referred to as a duty cycle) is not 1:1, the traveling amount signal INT is not outputted at a timing of a fixed period, even if the rotational speed of the motor is constant.
Accordingly, in order to use the traveling amount signal INT as a reference signal for the speed control and the printing control, a pulse generator having a duty cycle extremely close to 1:1 is required, so the pulse generator is required to have high accuracy. Thus, the cost is disadvantageously increased.
In order to eliminate the above drawback, since the period of an output signal of the above mentioned pulse generator is generally stable, it is conceivable to take a measure in processing on the motor control circuit side to carry out the speed control and the printing control every other time when the traveling amount signal INT rises to H level, i.e., to carry out the speed control and the print control and to output an inverted signal VACK when a traveling amount signal is given first; and to only output the inverting signal VACK when a traveling amount signal INT is given secondly. However, even in such a case, since an unnecessary traveling amount signal INT (i.e., the second traveling amount signal described above) is inputted to the motor control circuit, in the case where the rotational speed of the motor becomes high as shown in FIG. 3, the processing ability of the motor control circuit MDRC fails to follow that situation. As a result, an erroneous operation such that the A-phase pulse signal would change before the inverting signal VAC is inverted may take place, so the direction discrimination signal DIR is inverted (period P of FIG. 3) although the rotational direction of the motor does not change.